3.162 \(\int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^4} \, dx\)

Optimal. Leaf size=132 \[ \frac{2 i \sec (c+d x)}{35 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{2 i \sec (c+d x)}{35 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{3 i \sec (c+d x)}{35 a d (a+i a \tan (c+d x))^3}+\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4} \]

[Out]

((I/7)*Sec[c + d*x])/(d*(a + I*a*Tan[c + d*x])^4) + (((3*I)/35)*Sec[c + d*x])/(a*d*(a + I*a*Tan[c + d*x])^3) +
 (((2*I)/35)*Sec[c + d*x])/(d*(a^2 + I*a^2*Tan[c + d*x])^2) + (((2*I)/35)*Sec[c + d*x])/(d*(a^4 + I*a^4*Tan[c
+ d*x]))

________________________________________________________________________________________

Rubi [A]  time = 0.10815, antiderivative size = 132, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 2, integrand size = 22, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.091, Rules used = {3502, 3488} \[ \frac{2 i \sec (c+d x)}{35 d \left (a^4+i a^4 \tan (c+d x)\right )}+\frac{2 i \sec (c+d x)}{35 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{3 i \sec (c+d x)}{35 a d (a+i a \tan (c+d x))^3}+\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((I/7)*Sec[c + d*x])/(d*(a + I*a*Tan[c + d*x])^4) + (((3*I)/35)*Sec[c + d*x])/(a*d*(a + I*a*Tan[c + d*x])^3) +
 (((2*I)/35)*Sec[c + d*x])/(d*(a^2 + I*a^2*Tan[c + d*x])^2) + (((2*I)/35)*Sec[c + d*x])/(d*(a^4 + I*a^4*Tan[c
+ d*x]))

Rule 3502

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(a*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(b*f*(m + 2*n)), x] + Dist[Simplify[m + n]/(a*(m + 2*n)), Int[(d*Sec[
e + f*x])^m*(a + b*Tan[e + f*x])^(n + 1), x], x] /; FreeQ[{a, b, d, e, f, m}, x] && EqQ[a^2 + b^2, 0] && LtQ[n
, 0] && NeQ[m + 2*n, 0] && IntegersQ[2*m, 2*n]

Rule 3488

Int[((d_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(n_), x_Symbol] :> Simp[(b*(d
*Sec[e + f*x])^m*(a + b*Tan[e + f*x])^n)/(a*f*m), x] /; FreeQ[{a, b, d, e, f, m, n}, x] && EqQ[a^2 + b^2, 0] &
& EqQ[Simplify[m + n], 0]

Rubi steps

\begin{align*} \int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^4} \, dx &=\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4}+\frac{3 \int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^3} \, dx}{7 a}\\ &=\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4}+\frac{3 i \sec (c+d x)}{35 a d (a+i a \tan (c+d x))^3}+\frac{6 \int \frac{\sec (c+d x)}{(a+i a \tan (c+d x))^2} \, dx}{35 a^2}\\ &=\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4}+\frac{3 i \sec (c+d x)}{35 a d (a+i a \tan (c+d x))^3}+\frac{2 i \sec (c+d x)}{35 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{2 \int \frac{\sec (c+d x)}{a+i a \tan (c+d x)} \, dx}{35 a^3}\\ &=\frac{i \sec (c+d x)}{7 d (a+i a \tan (c+d x))^4}+\frac{3 i \sec (c+d x)}{35 a d (a+i a \tan (c+d x))^3}+\frac{2 i \sec (c+d x)}{35 d \left (a^2+i a^2 \tan (c+d x)\right )^2}+\frac{2 i \sec (c+d x)}{35 d \left (a^4+i a^4 \tan (c+d x)\right )}\\ \end{align*}

Mathematica [A]  time = 0.185143, size = 73, normalized size = 0.55 \[ \frac{i \sec ^4(c+d x) (7 i \sin (c+d x)+15 i \sin (3 (c+d x))+28 \cos (c+d x)+20 \cos (3 (c+d x)))}{140 a^4 d (\tan (c+d x)-i)^4} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]/(a + I*a*Tan[c + d*x])^4,x]

[Out]

((I/140)*Sec[c + d*x]^4*(28*Cos[c + d*x] + 20*Cos[3*(c + d*x)] + (7*I)*Sin[c + d*x] + (15*I)*Sin[3*(c + d*x)])
)/(a^4*d*(-I + Tan[c + d*x])^4)

________________________________________________________________________________________

Maple [A]  time = 0.05, size = 123, normalized size = 0.9 \begin{align*} 2\,{\frac{1}{{a}^{4}d} \left ({\frac{3\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{2}}}+{\frac{36}{5\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{5}}}+{\frac{4\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{6}}}-{\frac{8\,i}{ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{4}}}-6\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-3}+ \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{-1}-{\frac{8}{7\, \left ( \tan \left ( 1/2\,dx+c/2 \right ) -i \right ) ^{7}}} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)/(a+I*a*tan(d*x+c))^4,x)

[Out]

2/d/a^4*(3*I/(tan(1/2*d*x+1/2*c)-I)^2+36/5/(tan(1/2*d*x+1/2*c)-I)^5+4*I/(tan(1/2*d*x+1/2*c)-I)^6-8*I/(tan(1/2*
d*x+1/2*c)-I)^4-6/(tan(1/2*d*x+1/2*c)-I)^3+1/(tan(1/2*d*x+1/2*c)-I)-8/7/(tan(1/2*d*x+1/2*c)-I)^7)

________________________________________________________________________________________

Maxima [A]  time = 1.01088, size = 123, normalized size = 0.93 \begin{align*} \frac{5 i \, \cos \left (7 \, d x + 7 \, c\right ) + 21 i \, \cos \left (5 \, d x + 5 \, c\right ) + 35 i \, \cos \left (3 \, d x + 3 \, c\right ) + 35 i \, \cos \left (d x + c\right ) + 5 \, \sin \left (7 \, d x + 7 \, c\right ) + 21 \, \sin \left (5 \, d x + 5 \, c\right ) + 35 \, \sin \left (3 \, d x + 3 \, c\right ) + 35 \, \sin \left (d x + c\right )}{280 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="maxima")

[Out]

1/280*(5*I*cos(7*d*x + 7*c) + 21*I*cos(5*d*x + 5*c) + 35*I*cos(3*d*x + 3*c) + 35*I*cos(d*x + c) + 5*sin(7*d*x
+ 7*c) + 21*sin(5*d*x + 5*c) + 35*sin(3*d*x + 3*c) + 35*sin(d*x + c))/(a^4*d)

________________________________________________________________________________________

Fricas [A]  time = 2.24299, size = 166, normalized size = 1.26 \begin{align*} \frac{{\left (35 i \, e^{\left (6 i \, d x + 6 i \, c\right )} + 35 i \, e^{\left (4 i \, d x + 4 i \, c\right )} + 21 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 5 i\right )} e^{\left (-7 i \, d x - 7 i \, c\right )}}{280 \, a^{4} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="fricas")

[Out]

1/280*(35*I*e^(6*I*d*x + 6*I*c) + 35*I*e^(4*I*d*x + 4*I*c) + 21*I*e^(2*I*d*x + 2*I*c) + 5*I)*e^(-7*I*d*x - 7*I
*c)/(a^4*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))**4,x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.14042, size = 134, normalized size = 1.02 \begin{align*} \frac{2 \,{\left (35 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{6} - 105 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{5} - 210 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} + 210 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + 147 \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{2} - 49 i \, \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - 12\right )}}{35 \, a^{4} d{\left (\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) - i\right )}^{7}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)/(a+I*a*tan(d*x+c))^4,x, algorithm="giac")

[Out]

2/35*(35*tan(1/2*d*x + 1/2*c)^6 - 105*I*tan(1/2*d*x + 1/2*c)^5 - 210*tan(1/2*d*x + 1/2*c)^4 + 210*I*tan(1/2*d*
x + 1/2*c)^3 + 147*tan(1/2*d*x + 1/2*c)^2 - 49*I*tan(1/2*d*x + 1/2*c) - 12)/(a^4*d*(tan(1/2*d*x + 1/2*c) - I)^
7)